/*
 * @Author: zhangfeng
 * @Date: 2023-12-19 11:45:01
 * @LastEditTime: 2023-12-27 18:57:17
 * @LastEditors: zhangfeng
 * @Description:
 * @FilePath: \manager\managersystem\src\utils\successOrError.ts
 * © 2023 张峰，All rights reserved.
 */
const successOrError = (res: ResponseData) => {
	return new Promise((resolve, reject) => {
		if (res.code === 0) {
			ElMessage.success(res.message);
			resolve(res.result);
		}
	});
};

export default successOrError;
